<template>
  <div><!--
    <v-app-bar color="white">
      <v-btn to="/home"  color="dark" white>home</v-btn>后台账号登陆
      <v-spacer></v-spacer>
    </v-app-bar>-->
    <HomeHeader  :type_="type_"></HomeHeader>

    <v-content>
      <v-container ><div class="register-1">
        <i class="iconfont icon-title"></i>

      </div>
        <v-form
                ref="form"
                lazy-validation
        >
          <v-text-field
                  v-model="data._contact"
                  :counter="10"
                  label="账号(手机号)"
                  required
          ></v-text-field>
          <v-text-field
                  v-model="data._password"
                  label="密码"
                  required
          ></v-text-field>
          <v-switch class="ma-2" label="管理员"></v-switch>
          <v-switch  class="ma-2" label="医生"></v-switch>
          <div class="text-center">
            <v-btn rounded color="primary" dark @click="_login">登陆</v-btn>

            <div  class="my-2"><v-btn to="/admsignup" rounded color="primary" dark>注册</v-btn></div>
          </div>
        </v-form></v-container ></v-content>
  </div>
</template>



<script>

export default {
      data(){
        return {
          type_:"adm",
          data:{
          _contact: "",
          _password: ""}
        }
      }
,
methods: {
    _login(){
      this.data._option ='1001'
      this.$http.post(this.data,2).then((res)=>{
        this.response=res
      }).catch((err)=>{
        this.response=err
      })
    }
}
}
</script>

<style>
.register {
  width: 100%;
  height: 100%;
  position: fixed;
  background: white;
  left: 0;
  top: 0;
}
.register-1{
  margin-top: 2rem
}
.register-1 i {
  font-size:.8rem;
  color: darkblue;
/*  :linear-gradient(90deg,lightseagreen, darkblue ,purple);*/
  text-align: center;
  display: block;
}
.register-1 p {
  color: black;
  text-align: center;
  font-size: 0.5rem;
}
.register-2 {
  /* display: flex;
  flex-direction: column; */
  margin-top: 0.6rem;
  margin-bottom: 0.6rem
}
.register-2 label {
  width: 90%;
  margin: auto;
  height: 1.5rem;
  border-bottom: 0.03rem solid #f2f2f2;
  display: flex;
}
.register-2 label span {
  width: 20%;
  font-size: 0.5rem;
  line-height: 1.5rem;
  display: block;
  float: left;
}

.register-2 label input {
  width: 80%;
  font-size: 0.4rem;
  padding-left: 0.3rem;
}
.register-3 {
  display: flex;
}
.btn {
  width: 9rem;
  height: 1.1rem;
  margin: 0 auto;
  /* margin-top: 0.72rem; */
  margin-bottom: 0.3rem;
  text-align: center;
  line-height: 1.1rem;
  font-size: 0.45rem;
  color: #fff;
  border-radius: 0.6rem;
  background-color: lightseagreen;
  /*background-image: linear-gradient(90deg,lightseagreen, darkblue ,purple);*/
}
</style>

